
package jpoco.client;

public class PhoneNumber implements java.io.Serializable
{
	public static final String FAX = "fax";
	public static final String MOBILE = "mobile";
	public static final String PAGER = "pager";
	public static final String WORK = "work";
	
	private String type;
	private String value;
	private boolean primary = false;
	
	public PhoneNumber()
	{
		super();
	}

	public String getType()
	{
		return type;
	}

	public void setType(String t)
	{
		this.type = t;
	}

	public String getValue()
	{
		return value;
	}

	public void setValue(String v)
	{
		this.value = v;
	}
	
	public boolean isFax()
	{
		return FAX.equalsIgnoreCase(this.getType());
	}
	
	public boolean isMobile()
	{
		return MOBILE.equalsIgnoreCase(this.getType());
	}
	
	public boolean isPager()
	{
		return PAGER.equalsIgnoreCase(this.getType());
	}
	
	public boolean isWork()
	{
		return WORK.equalsIgnoreCase(this.getType());
	}
	
	public String toString()
	{
		return String.valueOf(this.getValue());
	}


	public boolean isPrimary()
	{
		return primary;
	}

	public void setPrimary(boolean b)
	{
		this.primary = b;
	}
	
}
